// 导入express
const express = require('express');

// 创建路由对象
const router = express.Router();


// 创建路由规则
router.get('/home', (req, res) => {
  res.end('hello world');
});


router.get('/admin', (res, req) => {
  req.send('后台首页')
})


// 暴露router
module.exports = router;